using System.Collections;
using System.Collections.Generic;
using Game;
using Game.UI;
using UnityEngine;

/**
 * UI初始化器
 * 预先加载一些常用的UI资源
 */
public class UIInitializer : GameInitializer
{
    public override void BeginInitialize(GameApp gameApp)
    {
        StartCoroutine(LoadUI());
    }

    // 加载协程
    private IEnumerator LoadUI()
    {
        UIManager.Instance.Preload("AlertDialog");
        yield return new WaitUntil(() => UIManager.Instance.IsLoaded("AlertDialog"));
        IsCompleted = true;
    }
}
